/*
 *  WeightEntry.java 
 *    
 *    Copyright 2012 YAWP Project Team
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

package com.googlecode.yawp.model;

import java.util.Calendar;


/**
 * This class represents a single weight entry.  It consists of a date (year, month, day) 
 * along with a weight.  The units of the weight are specified at the User class level.
 * 
 * @author Dan Spuches
 *
 */
public class WeightEntry extends DataEntry {

	private double weight;				// weight associated with this entry
	private boolean deleteFlag;
	

	/**
	 * Constructor for WeightEntry that allows for Calendar to be passed as parameter
	 * 
	 * @param date Calendar object for the date of this entry
	 * @param weight Weight of entry
	 */
	public WeightEntry(Calendar date, double weight, boolean deleteFlag) {
		super(date);
		this.weight = weight;
		this.deleteFlag = deleteFlag;
	}
	
	/**
	 * Standard getter method for weight of this entry
	 * 
	 * @return The weight of this entry
	 */
	public double getWeight() {
		return weight;
	}

	/**
	 * Standard setter method for weight of this entry
	 * 
	 * @param weight The weight of this entry
	 */
	public void setWeight(double weight) {
		this.weight = weight;
	}
	
	/**
	 * Standard setter method for deleteFlag
	 * 
	 * @return True if the weight entry is intended to be deleted, false if not
	 */
	public boolean getDeleteFlag() {
		return deleteFlag;
	}
	
	/**
	 * Standard setter method for deleteFlag
	 * 
	 * @param deleteFlag True if the weight entry is intended to be deleted, false if not
	 */
	public void setDeleteFlag(boolean deleteFlag) {
		this.deleteFlag = deleteFlag;
	}

	
}
